<!doctype html>
<html>
<head>
	<meta charset="utf-8">
    <!-- 确保移动端全屏显示 不能缩放 -->
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
	<meta name="description" content="angular+bootstrap">
    <title>文章详情</title>
	<link href="/static/css/base/bootstrap.css" rel="stylesheet">
    <link href="/static/css/base/font-awesome.min.css" rel="stylesheet">
    <link href="/static/css/index.css" rel="stylesheet">
</head>
<body ng-app="articleApp" style="background: #f6f6f6;">
	<!-- 公共头部导航 start -->
	<div ng-include="'header'"></div>
	<!-- 公共头部导航 end -->
    <div class="container" style="width:90%">
	   	<div class="article" ng-controller="articleAppController">
			<article id="97" class="post">
				<div class="featured" title="推荐文章" ng-if="article.isRecommend==1">
					<i class="icon-start-pos icon-star"></i>
				</div>
				<header class="post-head">
					<h4 class="post-title">{{article.title}}</h4>
					<div class="post-meta">
					<span class="author">
					作者：
					<a class="text" href="javaScript:void(0)">{{article.displayName}}</a>
					</span>
					•
					<time class="post-date" datetime="{{article.createTime | date:'yyyy-MM-dd HH:mm:ss'}}" title="{{article.createTime | date:'yyyy-MM-dd HH:mm:ss'}}">{{article.createTime | date:'yyyy年MM月dd日'}}</time>
					</div>
				</header>
				<section class="featured-media" ng-if="article.picture!=null && article.picture!=''">
					<img src="{{article.picture}}" alt="{{article.title}}">
				</section>
				<section class="post-content" id="content"></section>
			</article>
			<!-- <div class="about-author clearfix">
				<a href="/author/wangsai/">
				<img class="avatar pull-left" src="http://static.ghostchina.com/image/5/ea/da657733ee8c9add9cf3fd70183a6.png" alt="王赛">
				</a>
				<div class="details"> 
					<div class="author">关于作者<a class="text" href="/author/wangsai/">王赛</a></div>
					<div class="meta-info">
						<span class="loaction">
						<i class="fa fa-home"></i>
						北京
						</span>
						<span class="website">
						<i class="fa fa-globe"></i>
						<a class="text" href="http://www.bootcss.com" targer="_blank">个人网站/博客</a>
						</span>
					</div>
				</div>
			</div> -->
		</div>
	</div>
	<!-- 公共底部导航 start -->
	<div ng-include="'footer'"></div>
	<!-- 回到头部 -->
	<a id="back-to-top" href="#" style="display: none;">
		<i class="fa fa-angle-up"></i>
	</a>
	<!-- 公共底部导航 end -->
	<script src="/static/js/base/jquery-3.1.1.min.js"></script>
   	<script src="/static/js/base/angular.min.js"></script>
    <script src="/static/js/base/bootstrap.min.js"></script>
    <script src="/static/js/base/bootstrapValidator.js"></script>
    <script src="/static/js/base/jquery-cookie.js"></script>
    <script src="/static/js/base/jquery.Query.js"></script>
    <script src="/static/js/main.js"></script>
	<script type="text/javascript">
		var articleApp = angular.module("articleApp",[]);
		var id = $.query.get("id");
		articleApp.controller("articleAppController", function($scope, $http) {
			$http({
				method : "post",
				url : "/article/"+id+".json"
			}).success(function(dataResult) {
				var result =  dataResult.data;
				$scope.article = result;
				$("#content").html(result.content);
			});
		});
	</script>
</body>
</html>
